package cn.iocoder.yudao.module.yyzx.dal.mysql.service_object;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.yyzx.dal.dataobject.service_object.Service_objectDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.yyzx.controller.admin.service_object.vo.*;

/**
 * 服务对象 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface Service_objectMapper extends BaseMapperX<Service_objectDO> {

    default PageResult<Service_objectDO> selectPage(Service_objectPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<Service_objectDO>()
                .eqIfPresent(Service_objectDO::getCustomerId, reqVO.getCustomerId())
                .likeIfPresent(Service_objectDO::getCustomerName, reqVO.getCustomerName())
                .eqIfPresent(Service_objectDO::getNurseId, reqVO.getNurseId())
                .likeIfPresent(Service_objectDO::getNurseName, reqVO.getNurseName())
                .betweenIfPresent(Service_objectDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(Service_objectDO::getId));
    }

}